package Zoo;

abstract class Animal {
    String name;
    abstract void makeSound();
}
class Tiger extends Animal {
    Tiger() {name="Tiger";}

    @Override
    void makeSound() {
        System.out.println("Roar!");
    }
}
class Elephant extends Animal {
    Elephant(){name="Elephant";}

    @Override
    void makeSound(){
        System.out.println("Trumpet!");
    }
}
class Fox extends Animal {
    Fox() {name="Fox";}

    @Override
    void makeSound() {
        System.out.println("Meow Meow!");
    }
}
class Panda extends Animal {
    Panda() {name="Panda";}

    @Override
    void makeSound() {
        System.out.println("Hmm Hmm!");
    }
}
public class Zoo {
    public static void main(String[] args) {
        Animal[] animals=new Animal[10];
        for(int i=0;i< animals.length;i++) {
            int random=(int) (Math.random()*4);
            switch(random) {
                case 0:
                    animals[i]=new Tiger();
                    break;
                case 1:
                    animals[i]=new Elephant();
                    break;
                case 2:
                    animals[i]=new Fox();
                    break;
                case 3:
                    animals[i]=new Panda();
                    break;
            }
        }
        for(Animal animal:animals) {
            if(animal!=null) {
                animal.makeSound();
            }
        }
    }
}
